import RequestUtils from '@/utils/RequestUtils'

const groupName = 'order'
const apiName = 'salesOrderItem'

export default {
  findTotalOrder() {
    return RequestUtils({
      url: `/${groupName}/${apiName}/findTotalOrder`,
      method: 'post'//,
      // data: {
      //   ...params
      // }
    })
  },
  findTotalTodayOrder() {
    return RequestUtils({
      url: `/${groupName}/${apiName}/findTotalTodayOrder`,
      method: 'post'//,
      // data: {
      //   ...params
      // }
    })
  },  
  countMonthStats() {
    return RequestUtils({
      url: `/accounting/accApSkuMonthlySettlement/countMonthlyLineChart`,
      method: 'post'//,
      // data: {
      //   ...params
      // }
    })
  },
  countTotalPurchase() {
    return RequestUtils({
      url: `/accounting/accApSkuMonthlySettlement/countMonthTotalPurchase`,
      method: 'post'//,
      // data: {
      //   ...params
      // }
    })
  },
  countTotalTodayPurchase() {
    return RequestUtils({
      url: `/accounting/accountingAp/countTotalTodayPurchase`,
      method: 'post'//,
      // data: {
      //   ...params
      // }
    })
  },
 
  countTodayTotalSale() {
    return RequestUtils({
      url: `/accounting/accountingAp/countTodayTotalSale`,
      method: 'post'//,
      // data: {
      //   ...params
      // }
    })
  },
  countTotalSale() {
    return RequestUtils({
      url: `/accounting/accApSkuMonthlySettlement/countMonthTotalSale`,
      method: 'post'//,
      // data: {
      //   ...params
      // }
    })
  },

  findDayInRealtime(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findDayInRealtime`,
      method: 'post'
    })
  },
  findMonthIn(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findMonthIn?monthDateStr=`+params,
      method: 'post'
    })
  },
  findYearIn(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findYearIn?yearDateStr=`+params,
      method: 'post'
    })
  },
  findDayOut(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findDayOut?dayDateStr=`+params,
      method: 'post'
    })
  },
  findDayOutRealtime(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findDayOutRealtime?dayDateStr=`+params,
      method: 'post'
    })
  },
  findMonthOut(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findMonthOut?monthDateStr=`+params,
      method: 'post'
    })
  },
  findYearOut(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findYearOut?yearDateStr=`+params,
      method: 'post'
    })
  },
  findInventory(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findInventory`,
      method: 'post'
    })
  },
  findInventoryRealtime(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findInventoryRealtime`,
      method: 'post'
    })
  },
  findTotalIn(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findTotalIn`,
      method: 'post'
    })
  },
  findTotalOut(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findTotalOut`,
      method: 'post'
    })
  },
  findTotalData(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findTotalData`,
      method: 'post'
    })
  },
  findTodayInOutInventory(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findTodayInOutInventory`,
      method: 'post'
    })
  },
  findAllInOutInventory(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findAllInOutInventory`,
      method: 'post'
    })
  },
  findAllInRealtime(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findAllInRealtime`,
      method: 'post'
    })
  },
  findAllOutRealtime(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findAllOutRealtime`,
      method: 'post'
    })
  },
  findTotalDayInOfMonth(params) {
    if (!params) params = '';
    return RequestUtils({
      url: `/${groupName}/findTotalDayInOfMonth`,
      method: 'post'
    })
  }
}
